package com.champaign.spring.takeaway;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 描述:
 * Merchant Client
 * @author yd
 * @create 2019-04-25 11:20
 */
public class MerchantClient {

    public static void main(String[] args) {

        ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml");

        FoodDeliveryPlatform foodDeliveryPlatform = ac.getBean("foodDeliveryPlatform", FoodDeliveryPlatform.class);

        DeliveryStatus deliveryStatus = foodDeliveryPlatform.doDelivery();

        System.out.println(deliveryStatus.getStatus());
    }

}
